/*

* ------------------------------------------------------------------------
* ------------------------------------------------------------------------
* |     Smart-Shop开源商城系统/ Java商城-首选电商平台系统 请务必保留此注释头信息
* |     开源地址: https://gitee.com/ningbo-qishan/gruul-mall
* ------------------------------------------------------------------------
* ------------------------------------------------------------------------
* |     可正常分享和学习源码,未经授权 不可商用！
* |     商业版中台购买/开源版商业授权 联系技术客服
* |     官网:  https://www.73app.cn/
* ------------------------------------------------------------------------
* ------------------------------------------------------------------------
* |     Copyright (c) 2016-2999 宁波启山智软科技有限公司
* |     版权所有 ,侵权必究！
* ------------------------------------------------------------------------

*/
package com.medusa.gruul.integral.web.model.dto.manager;

import cn.hutool.core.bean.BeanUtil;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.medusa.gruul.integral.api.entity.IntegralGoods;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.ApiOperation;
import lombok.Data;

import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.List;

/**
 * @Description:积分商品信息
 * @Author: xiaoq
 * @Date : 2019/11/19 13:48
 */
@Data
@ApiModel(value = "新增或修改积分商品的DTO")
public class IntegralGoodsDto {
	private Long id;

	@ApiModelProperty(value = "积分商城表id")
	private Long tIntegralShopId;

	@NotNull
	@ApiModelProperty(value = "积分商品名")
	private String integralGoodName;

	@ApiModelProperty(value = "指导价")
	private BigDecimal guidePrice;

	@NotNull
	@ApiModelProperty(value = "库存")
	private Integer inventory;

	@NotNull
	@ApiModelProperty(value = "积分(售卖)")
	private BigDecimal integralPrice;

	@ApiModelProperty(value = "属性模板id")
	private Long attributeId;

	@ApiModelProperty(value = "属性模板名称")
	private String attributeName;

	@NotNull
	@ApiModelProperty(value = "商品主图")
	private String pic;

	@ApiModelProperty(value = "画册图片，连产品图片限制为6张，以逗号分割")
	private String albumPics;

	@ApiModelProperty(value = "销量(初始销量)")
	private Integer sales;

	@ApiModelProperty(value = "运费模板id")
	private Long freightTemplateId;

	@ApiModelProperty(value = "状态(默认上架，0--下架（仓库中），1--上架，2--已售完)")
	private Integer status;

	@ApiModelProperty(value = "货号")
	private String productSn;

	@ApiModelProperty(value = "积分商品详情")
	private String detail;

	@ApiModelProperty(value = "单位")
	private String unit;

	@ApiModelProperty(value = "商品重量,默认为克")
	private BigDecimal weight;

	@ApiModelProperty(value = "积分商品属性信息")
	private List<IntegralGoodsAttibuteDto> integralGoodsAttibuteDtos;

	@ApiModelProperty(value = "积分商品运费模板信息")
	private  List<IntegralFreightTemplateDto> integralFreightTemplateDtos;

	public IntegralGoods coverIntegralGoods(){
		IntegralGoods integralGoods = new IntegralGoods();
		BeanUtil.copyProperties(this,integralGoods);
		return integralGoods;
	}
}
